// The Swift Programming Language
// https://docs.swift.org/swift-book

/*
// 测试代码
import SwiftUI

class YourViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // 调用同步方法
        syncFilesFromWatch()
    }
    
    func syncFilesFromWatch() {
        // 显示加载状态
        WatchFileSyncService.shared.syncStatus = .syncing
        
        // 发起同步请求
        WatchFileSyncService.shared.requestSyncFromWatch { [weak self] result in
            DispatchQueue.main.async {
                switch result {
                case .success:
                    print("文件同步成功")
                    // 处理成功情况，更新UI
                    self?.showSuccessMessage()
                case .failure(let error):
                    print("文件同步失败: \(error.localizedDescription)")
                    // 处理失败情况，显示错误
                    self?.showErrorMessage(error)
                }
            }
        }
    }
    
    func showSuccessMessage() {
        // 显示成功提示
        let alert = UIAlertController(title: "成功", message: "文件已成功同步", preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: "确定", style: .default))
        present(alert, animated: true)
    }
    
    func showErrorMessage(_ error: Error) {
        // 显示错误提示
        let alert = UIAlertController(title: "错误", message: error.localizedDescription, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: "确定", style: .default))
        present(alert, animated: true)
    }
}
*/
